/*=============================================================================
// File Name:   drv_spi.h
// Author:      Wood Wang
// Date:        2020/03/14
// Version:     v1.0

=============================================================================*/

#ifndef __DRV_SPI_H
#define __DRV_SPI_H
/* Includes -----------------------------------------------------------------*/
#include "main.h"


void drv_spi_gpio_init(void);
//void spi_writebyte(uint8_t index,uint8_t TxData);
//uint8_t spi_readbyte(uint8_t index);

uint8_t spi_writebuff(uint8_t index,uint8_t *buff,uint32_t len);
uint8_t spi_readbuff (uint8_t index,uint8_t *buff,uint32_t len);

void spi_write_read(uint8_t index,uint8_t * wbuf,uint32_t wl,uint8_t * rbuf,uint32_t rl);

void spi_pre_h(void);
void spi_pre_l(void);

#endif  //__DRV_SPI_H

